﻿@using AbpLearningDemo.DataModels
@using AbpLearningDemo.Web.Models.Common.Modals
@model AbpLearningDemo.Web.Models.Companies.EditCompanyModalViewModel
@{
    Layout = null;
}
@Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel("编辑企业"))
<div class="modal-body">
    <form name="CompanyEditForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="Id" value="@Model.Company.Id" />
        <div role="tabpanel" class="tab-pane animated fadeIn active" id="edit-company-details">
            <div class="row clearfix" style="margin-top:10px;">
                <div class="col-sm-12">
                    <div class="form-group form-float">
                        <div class="form-line">
                            <input id="name" type="text" name="Name" value="@Model.Company.Name" required maxlength="@Company.MaxNameLength" minlength="2" class="validate form-control">
                            <label for="name" class="form-label">企业名称</label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row clearfix">
                <div class="col-sm-12">
                    <div class="form-group form-float">
                        <div class="form-line">
                            <input id="phone" type="text" name="Phone" value="@Model.Company.Phone" maxlength="@Company.MaxPhoneLength" class="validate form-control">
                            <label for="phone" class="form-label">企业电话</label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row clearfix">
                <div class="col-sm-12">
                    <div class="form-group form-float">
                        <div class="form-line">
                            <input id="address" type="text" name="Address" value="@Model.Company.Address" maxlength="@Company.MaxAddressLength" class="validate form-control">
                            <label for="address" class="form-label">企业地址</label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row clearfix">
                <div class="col-sm-12">
                    <div class="form-group form-float">
                        <div class="form-line">
                            <input id="introduction" type="text" name="Introduction" value="@Model.Company.Introduction" maxlength="@Company.MaxIntroductionLength" class="validate form-control">
                            <label for="introduction" class="form-label">企业简介</label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row clearfix">
                <div class="col-sm-12">
                    <div class="form-group form-float">
                        <div class="">
                            <input id="IsActive" type="checkbox" name="IsActive" value="true" @(Model.Company.IsActive ? "checked" : "") class="form-control" />
                            <label for="IsActive" class="form-label">启用</label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
@Html.Partial("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
<script src="~/Views/Companies/_EditCompanyModal.js"></script>
